package com.xm.client.test;

import com.xm.api.LoginApi;
import com.xm.common.entity.LoginRequest;
import com.xm.common.entity.R;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @author yousj
 * @since 2022-03-25
 */
@Component
public class LoginClient {

    @Resource
    LoginApi loginApi;

    @PostConstruct
    public void login(){
        LoginRequest loginRequest = new LoginRequest();
        loginRequest.setUsername("18037300759");
        loginRequest.setPassword("123456");
        R login = loginApi.login(loginRequest);
        System.out.println(login);
    }

}
